]> dgit.raspbian.org Git - gnome-shell.git/commit
perf-tool: Add --wrap to wrap the gnome-shell call
authorJonas Ådahl <jadahl@gmail.com>
Sat, 3 Sep 2022 20:48:20 +0000 (22:48 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 25 Nov 2022 21:09:54 +0000 (22:09 +0100)
commita13a2dca6662ea4277c4c95a6a2b5e1ae9d19a0a
treee1380e09aea2bf2e88197579f9e11e2fdf052ae2
parent4c6bc1ed00fd349e04bbbf9ca7c424fe5a8ba696
perf-tool: Add --wrap to wrap the gnome-shell call

This allows neat tricks like first arranging the script `fakegdb`:

```sh

function ignore_gdb_arg() {
    if [[ "$1" == "--quiet" ]] || [[ "$1" == "--args" ]]; then
    return 1
    else
    return 0
    fi
}

ignore_gdb_arg "$1" || shift
ignore_gdb_arg "$1" || shift

echo exec "$@"
```

then running

```sh
meson test -C build -v perf-basic --test-args '--wrap "gdb --args"' --gdb --gdb-path `which fakegdb`
```

To make it possible to run the perf test case with gdb running the
actual gnome-shell.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
src/gnome-shell-perf-tool.in